package com.whmall.service.crm.module.companybusinesslicense.dao;

import com.whmall.service.crm.entity.dto.companybusinesslicense.BusinessLicenseQueryReqDTO;
import com.whmall.service.crm.module.companybusinesslicense.entity.CompanyBusinessLicenseDO;
import com.whmall.service.crm.module.companybusinesslicense.entity.qo.CompanyBusinessLicenseQO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * Author：yangdong
 * Date：2020/8/3
 * Description：营业执照mapper
 */
@Mapper
public interface CompanyBusinessLicenseMapper {


    CompanyBusinessLicenseDO getById(Long id);

    int insert(CompanyBusinessLicenseDO record);

    int update(CompanyBusinessLicenseDO record);

    int countEffective(@Param("id") Long id, @Param("companyId") Long companyId, @Param("socialCreditCode") String socialCreditCode);

    /**
     * 根据证照有效期重新验证有效性
     */
    void revalidateEffective();

    List<CompanyBusinessLicenseDO> selectByReqDTO(BusinessLicenseQueryReqDTO queryReqDTO);

    List<CompanyBusinessLicenseDO> selectBy(CompanyBusinessLicenseQO qo);

}